<template>
  <view class="page">
    <UserDate/>
    
    <view class="tcard">
      <view class="title">
        添加就诊人
      </view>
      <view class="tform">
        <view class="tform-item">
          <view class="value">
            姓名
          </view>
          <input type="text" v-model="form.name" placeholder="请输入姓名"/>
        </view>
        <view class="tform-item">
          <view class="value">
            证件类型
          </view>
          <!-- <input type="text" value="" placeholder="请输入姓名"/> -->
          <view class="">
            身份证
          </view>
        </view>
        <view class="tform-item">
          <view class="value">
            证件号
          </view>
          <input type="text" v-model="form.identityCard" placeholder="请输入证件号" @blur="getSexBarth"/>
        </view>
        <view class="tform-item">
          <view class="value">
            性别
          </view>
          <!-- <picker style="width: 100upx;height: 40upx;text-align: right;" @change="bindPickerChange" range-key="label" :value="sex" :range="sexList">
            <view class="uni-input">{{sexList[sex].label}}</view>
          </picker> -->
          <view v-if="form.sex" class="uni-input">{{sexList[form.sex - 1].label}}</view>
          <!-- <view v-else class="uni-input-placeholder">
            输入证件号展示
          </view> -->
          <input v-else disabled type="text" v-model="form.sex" placeholder="输入证件号展示"/>
        </view>
        <view class="tform-item">
          <view class="value">
            就诊卡号
          </view>
          <input type="text" v-model="form.identityCard" placeholder="请输入就诊卡号" @blur="getSexBarth"/>
        </view>
        <view class="tform-item">
          <view class="value">
            现住址
          </view>
          <input type="text" v-model="form.ssxAddress" placeholder="请输入现住址"/>
        </view>
        <view class="tform-item">
          <view class="value">
            详细地址
          </view>
          <input type="text" v-model="form.ssxAddress" placeholder="请填写街道、小区、门牌号等"/>
        </view>
        <view class="tform-item">
          <view class="value">
            本人电话
          </view>
          <input type="number" v-model="form.phoneNumber" placeholder="请输入手机号"/>
        </view>
        <view class="tform-item">
          <view class="value">
            户口地址
          </view>
          <input type="text" v-model="form.ssxAddress" placeholder="请输入户口地址"/>
        </view>
        <view class="tform-item">
          <view class="value">
            紧急联系人
          </view>
          <input type="text" v-model="form.name" placeholder="请输入请输入紧急联系人姓名"/>
        </view>
        <view class="tform-item">
          <view class="value">
            联系人电话
          </view>
          <input type="number" v-model="form.phoneNumber" placeholder="请输入联系人电话"/>
        </view>
        <view class="tform-item">
          <view class="value">
            与本人关系
          </view>
          <input type="number" v-model="form.phoneNumber" placeholder=""/>
        </view>
        <view class="tform-item" style="border: none;">
          <view class="value">
            联系人地址
          </view>
          <input type="number" v-model="form.phoneNumber" placeholder="请输入联系人地址"/>
        </view>
      </view>
    </view>
    
    <view class="btm-btn" @click="toSuccess">
      提交登记信息
    </view>
  </view>
</template>

<script>
  import UserDate from '@/components/UserInfo/user-date.vue'
  export default {
    components: {UserDate},
    data() {
      return {
        form: {}
      }
    },
    methods: {
      toSuccess() {
        uni.navigateTo({
          url: `./success`
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
uni-input {
  text-align: right;
  .uni-input-placeholder {
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 28upx;
    color: rgba(0,0,0,0.24);
  }
}
</style>
